<?php
$this->pageTitle = $model->title;
?>


<div style="width:270px;float:left;">
<div id="ProductSortCssID">

<ul id="pstMenu">


<?php 
$children = NewsCategory::model()->findAll(array('condition'=>'ParentID=:parent_id', 'params'=>array(':parent_id'=>$model->category_id)));
if(empty($children)) {
$children = NewsCategory::model()->findAll(array('condition'=>'ParentID=0'));
}
$list = array();
foreach($children as $cat) {

    $list[] = $cat->id;

?>
<li><?php echo CHtml::link($cat->ClassName, array('newsCategory/view','id'=>$cat->id));?></li>
<?php } ?>

</ul>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

<script type="text/javascript">
sfHover = function() { 
    var sfEls = document.getElementById("pstMenu").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) { 
        sfEls[i].onmouseover=function() { 
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() { 
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

</script>
</div>
</div>
<div style="width:700px;float:right;margin:0px 0px 50px 0px;">
<div id="bread">
<a href="/">首页</a>
>>
<a href="<?php echo Yii::app()->createUrl('newsCategory/view', array('id'=>$model->category_id));?>"><?php echo $model->category->ClassName;?></a>
</div>
<h1><?php echo $model->title; ?></h1>
<center><?php echo $model->date;?></center>

<p id="content">
<?php echo $model->content;?>
</p>
</div>
